<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="InvasiveSpecies.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Invasive Cafe - Games
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Games</h2>
    <p>
        Welcome to the games page! Here is a list of the games in our database:</p>
    <table>
        <thead>
            <tr>
                <td>
                    Name
                </td>
                <td>
                    Description
                </td>
            </tr>
        </thead>
        <tbody>
            <% foreach (Game game in (IEnumerable)ViewData.Model)
               { %>
            <tr>
                <td>
                    <a href="Game/ShowGame/<%= game.Name.Replace(' ','-') %>">
                        <img src="Content/Thumb nails/<%= game.Name.Replace(' ','-') %>.png" alt="<%= game.Name %>" /></a>
                </td>
                <td>
                    <%= Html.Encode(game.Description) %>
                </td>
            </tr>
            <% } %>
        </tbody>
    </table>
</asp:Content>
